package com.handpay.zztong.hp.main.model.availabletradetype;

import android.os.Parcel;

import com.handpay.zztong.hp.bean.ResponseBean;

import java.util.List;

/**
 * Created by lyang on 2017/2/23.
 */

public class AvailableTradeType extends ResponseBean {
    /**
     * items : 4
     * list : [{"isOpen":1,"tradeType":4},{"isOpen":1,"tradeType":3},{"isOpen":1,"tradeType":1},{"isOpen":1,"tradeType":2}]
     */

    private int items;
    private List<ListBean> list;

    public int getItems() {
        return items;
    }

    public void setItems(int items) {
        this.items = items;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements android.os.Parcelable {
        /**
         * isOpen : 1
         * tradeType : 4
         */

        private int isOpen;
        private int tradeType;

        public int getIsOpen() {
            return isOpen;
        }

        public void setIsOpen(int isOpen) {
            this.isOpen = isOpen;
        }

        public int getTradeType() {
            return tradeType;
        }

        public void setTradeType(int tradeType) {
            this.tradeType = tradeType;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.isOpen);
            dest.writeInt(this.tradeType);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.isOpen = in.readInt();
            this.tradeType = in.readInt();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(this.items);
        dest.writeTypedList(this.list);
    }

    public AvailableTradeType() {
    }

    protected AvailableTradeType(Parcel in) {
        super(in);
        this.items = in.readInt();
        this.list = in.createTypedArrayList(ListBean.CREATOR);
    }

    public static final Creator<AvailableTradeType> CREATOR = new Creator<AvailableTradeType>() {
        @Override
        public AvailableTradeType createFromParcel(Parcel source) {
            return new AvailableTradeType(source);
        }

        @Override
        public AvailableTradeType[] newArray(int size) {
            return new AvailableTradeType[size];
        }
    };
}
